home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1287_mouse_scaling.rtf < prev    next >
Text File  |  1995-06-12  |  3KB  |  67 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\fmodern Ohlfs;\f1\fmodern Courier;\f3\fswiss Helvetica;}
  2. \paperw10800
  3. \paperh8020
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  
  8. \fc1\cf1 How can I get my mouse pointer to stop jumping around, and to glide smoothly across the screen? \
  9. \
  10. A: Type the following command into a shell window:\
  11. \
  12.     % 
  13. \f2\fs22 dwrite NeXT1 MouseScaling "
  14. \f1\i\fs24 string
  15. \f2\i0\fs22 "\
  16.     
  17. \f0\fs28 \
  18. Where
  19. \f2\fs22  "
  20. \f1\i\fs24 string
  21. \f2\i0\fs22 "
  22. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\f0\fs28\fc1\cf1  
  23. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 contains
  24. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\fc1\cf1  a single value indicating the number of integer pairs to follow, followed by the actual pairs. 
  25. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1  The integer pairs are (speed, acceleration) pairs.  These integer pairs make the mouse movement on the screen dependent both on the distance the mouse was moved on the pad, and its acceleration and speed.   
  26. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\fc1\cf1 When you change the mouse speed through 
  27. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 the P
  28. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\fc1\cf1 references
  29. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1  application
  30. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\fc1\cf1 , it creates one of these. Here's 
  31. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 the format of a
  32. \pard\tx620\tx1240\tx1860\tx2480\tx3100\tx3720\tx4340\tx4980\tx5600\tx6220\fc1\cf1  MouseScaling argument:\
  33. \
  34.  
  35. \f2\fs22     % dwrite NeXT1 MouseScaling "N x1 a1 x2 a2 x3 a3 x4 a4 ... xN aN"\
  36.  
  37. \f0\fs28 \
  38. To give the mouse a smoother motion across the screen, you must make the mouse movement linear (uniform, but slow).  This 
  39. \b dwrite
  40. \b0  will do the trick:\
  41. \
  42.  
  43. \f2\fs22     % dwrite NeXT1 MouseScaling "1 1 1"\
  44.  
  45. \f0\fs28 \
  46. This means that if you move the mouse 
  47. \f2\fs22 x
  48. \f0\fs28  amount on the pad, it moves it by 
  49. \f2\fs22 kx
  50. \f0\fs28  pixels on the screen regardless of how long it took. (
  51. \f2\fs22 k
  52. \f0\fs28  is the constant which translates the mouse pad coordinate system to the screen coordinate system.)\
  53. \
  54.  
  55. \i Warning
  56. \i0 : we cannot guarantee the support of 
  57. \b dwrite
  58. \b0 s in future releases, so do not put this in your application or rely on it in any way.
  59. \f3 \
  60.  
  61. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fc1\cf1 \
  62. QA775\
  63. \
  64. Valid for 2.0, 3.0, 3.1\
  65. \
  66.  
  67.